package com.pray.praymall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pray.common.utils.PageUtils;
import com.pray.praymall.member.entity.MemberEntity;
import com.pray.praymall.member.exception.PhoneExistsException;
import com.pray.praymall.member.exception.UserNameExistsException;
import com.pray.praymall.member.vo.MemberLoginVo;
import com.pray.praymall.member.vo.MemberRegisterVo;

import java.util.Map;

/**
 * 会员
 *
 * @author pray
 * @email pray_cbh@163.com
 * @date 2020-08-29 12:03:26
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 会员注册
     * @param vo vo
     */
    void register(MemberRegisterVo vo) throws PhoneExistsException, UserNameExistsException;

    void checkPhoneUnique(String phone) throws PhoneExistsException;

    void checkUserNameUnique(String userName) throws UserNameExistsException;

    /**
     * 登录
     * @param vo vo
     * @return MemberEntity
     */
    MemberEntity login(MemberLoginVo vo);
}

